home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / pbaseiv.zip / P4DOS006.TIP < prev    next >
Text File  |  1991-12-16  |  2KB  |  38 lines

  1. The DOS ECHO command doesn't provide any obvious way to
  2. display a blank line. But there's a simple solution to the
  3. problem: On a blank line in your batch file, type ECHO,
  4. press <Space>, then hold down the <Alt> key as you type 255
  5. on the numeric keypad. When you release the <Alt> key, the
  6. cursor will move as if you'd just typed a space. But when
  7. you run your batch file, a blank line will appear.
  8.  
  9. This technique also lets you ECHO the words on and off,
  10. which would normally be interpreted by the command processor
  11. as part of the command. You simply type ECHO, press the
  12. <Space> bar, type <Alt>-255, then type ON or OFF. But I
  13. still haven't figured out how to ECHO a < or > character
  14. without getting a `File not found' error message.
  15.  
  16. G. F. Christiann
  17. Ft. Lauderdale, Florida
  18.  
  19. Editor's note: This trick relies on the fact that the line
  20. you're displaying isn't really blank; it contains ASCII
  21. character 255, which just happens to appear on screen as a
  22. blank. You can also use ECHO followed immediately by a
  23. period to make a batch file display a blank line.
  24.  
  25. As for displaying the < and > characters--you can't use the
  26. ECHO command to show them by themselves, but you can ECHO
  27. them as part of a string enclosed in double quotes. In other
  28. words, ECHO > won't work, but ECHO ">" will. The double
  29. quotes will appear along with the string, which looks
  30. ridiculous by itself, but is fine if you're describing a
  31. command, as in ECHO TYPE "TYPE filename > PRN".
  32.  
  33. Title: Drawing a Blank in a Batch File
  34. Category: DOS
  35. Issue date: Oct 1991
  36. Editor: Brett Glass
  37. Supplementary files: NONE
  38.